package com.changgou.intercepter;

import feign.RequestInterceptor;
import feign.RequestTemplate;
import org.omg.PortableInterceptor.Interceptor;
import org.springframework.stereotype.Component;
import org.springframework.web.context.request.RequestAttributes;
import org.springframework.web.context.request.RequestContextHolder;

/**
 * @program: changgou_parent
 * @author: zhanzhewan
 * @create: 2020-03-31 10:54
 **/
@Component
public class FeignInterceptor implements RequestInterceptor {
    @Override
    public void apply(RequestTemplate requestTemplate) {
        // 传递令牌
        RequestAttributes requestAttributes = RequestContextHolder.getRequestAttributes();

    }
}
